public class Car{
    private String color;
    private String brand;
    private double price;
    //get/set方法
    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color = color;
    }
     public String getBrand(){
        return brand;
    }
    public void setBrand(String brand){
        this.brand = brand;
    }
     public double getPrice(){
        return price;
    }
    public void setPrice(double price){
        this.price = price;
    }
    //构造器
    public Car(){
        System.out.println("无参构造器");
    }
    public Car(String color,String brand,double price){
    System.out.println("全参构造器");
    this.color = color;
    this.brand = brand;
    this.price = price;
    }
    //成员方法
    public void goAhend(){
        System.out.println("前进");
    }
    public void goBack(){
        System.out.println("后退");
    }
    public void turn(){
        System.out.println("转弯");
    }
    public void show(){
        System.out.println("颜色：" + color + " 品牌：" + brand + " 价格：" + price);
    }

}